/// userId : 101
/// groupId : null
/// avatar : "https://randomuser.me/api/portraits/men/14.jpg"
/// name : "Kimi"
/// groupTile : null

class ContactModel {
  ContactModel({
      this.userId, 
      this.groupId, 
      this.avatar, 
      this.name,
      this.letter,
      this.groupTile,});

  ContactModel.fromJson(dynamic json) {
    userId = json['userId'];
    groupId = json['groupId'];
    avatar = json['avatar'];
    name = json['name'];
    groupTile = json['groupTile'];
    letter = json['letter'];
  }
  num? userId;
  dynamic groupId;
  String? avatar;
  String? name;
  String? letter;
  dynamic groupTile;
ContactModel copyWith({  num? userId,
  dynamic groupId,
  String? avatar,
  String? letter,
  String? name,
  dynamic groupTile,
}) => ContactModel(  userId: userId ?? this.userId,
  groupId: groupId ?? this.groupId,
  avatar: avatar ?? this.avatar,
  name: name ?? this.name,
  letter: letter ?? this.letter,
  groupTile: groupTile ?? this.groupTile,
);
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['userId'] = userId;
    map['groupId'] = groupId;
    map['avatar'] = avatar;
    map['name'] = name;
    map['groupTile'] = groupTile;
    map['letter'] = letter;
    return map;
  }

}